<!-- 头部 -->
<include file="Public:header" />

<!-- 资料认证  侧边/头部 -->
<include file="Public:zlrz_header" />


            <div style="height: 976px;" class="nav-a-settings" id="navconfig">
                <ul style="top: 0px;">
                    <li data-nav="showI2">
                        <a href="{:U('jiazhang/head',array('newcity'=>$city))}" ><span class="sp3">&nbsp;</span>头像</a>
                    </li>
                    <li data-nav="showI4">
                        <a href="{:U('jiazhang/jiazhang_one',array('newcity'=>$city))}"><span class="sp5">&nbsp;</span>家长信息</a>
                    </li>
                     <li data-nav="showI4">
                        <a href="{:U('jiazhang/jiazhang_info',array('newcity'=>$city))}"><span class="sp5">&nbsp;</span>学生信息</a>
                    </li>
                    <li data-nav="showI0">
                        <a href="{:U('jiazhang/password',array('newcity'=>$city))}" class="active"><span class="sp1">&nbsp;</span>账号及密码</a>
                    </li>
                </ul>
            </div>
        <div class="content-a-settings" id="CoF0" style="overflow: hidden;">
            <div class="heaD">
                <ul class="nav-lia cLr" id="nav-setup-area0">
                    <li><a href="javascript:void(0);" data-tab="tab-password" class="active">重置密码</a></li>
                </ul>
            </div>
            <form class="layui-form" method="post">
            <div class="lrem x-p fn-hide" id="tab-password" style="overflow: hidden; display: block;">
                <div class="o0o cLr">
                    <span class="title-o0o"><label style="width: 120px;">输入原密码：</label></span>
                    <div class="input-tips">
                        <input type="password" name="password" required lay-verify="required" placeholder="请输入原密码" class="pub" value="{$showke_info.address}">
                    </div>
                </div>
                <div class="o0o cLr">
                    <span class="title-o0o"><label style="width: 120px;">输入新密码：</label></span>
                    <div class="input-tips">
                        <input type="password" name="newpassword" required lay-verify="required" placeholder="请输入新密码" class="pub" value="{$showke_info.address}">
                    </div>
                </div>
                <div class="o0o cLr">
                    <span class="title-o0o"><label style="width: 120px;">重复输入新密码：</label></span>
                    <div class="input-tips">
                        <input type="password" name="renewpassword" required lay-verify="required" placeholder="请重复输入新密码" class="pub" value="{$showke_info.address}">
                        <button class="layui-btn layui-btn-warm" lay-filter="*" lay-submit style="background-color: #30c76c;">保存</button>
                    </div>
                </div>
            </div>
            </form>
        </div>
<script type="text/javascript">
    layui.use(['form','layer'], function(){
      var layer = layui.layer
      ,form = layui.form();
      //layer.msg('Hello World');

      //交互
    form.on('submit(*)', function(data){
      //console.log(arr);
        $.ajax({
            url: "{:U('jiazhang/password_add')}",//请求地址
            type: "post",//请求方式
            dataType: "json",//返回数据类型
            data: data.field,//发送的参数
            })
            .done(function(response) {
                  if(response.error==0){
                     layer.msg(response.info ,{icon:5});

                  }else{
                     layer.msg(response.info ,{icon:6});
                     location.href = "{:U('user/login')}"

                  }
              })
            .fail(function() {
                alert("ajxs交互失败");
            })  

          return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });   

    });
</script>
</html>